<!doctype html>
<html>
<head>
    <link rel="icon" type="image/x-icon" href="/static/favicon.ico">
    <meta charset="utf-8">
    <title>jQuery Growl 插件的example文件</title>

    <style>
        /*添加这个样式*/
        #growls.default {
        /*!important这个实测,去除前面的设置就失效了*/
            top: 15px !important;
            left: 100px !important;
            /*如果准备左边显示，就把这个数值调成80 %;*/
        }
    </style>
    <script src="../static/js/jquery-3.3.1.js" type="text/javascript"></script>
    <script src="../static/js/jquery.growl.js" type="text/javascript"></script>
    <link href="../static/css/jquery.growl.css" rel="stylesheet" type="text/css"/>

    <script type="text/javascript">
        $(function () {
            $.growl({
                title: "消息标题",
                message: "消息内容!"
            });

            $('.error').click(function (event) {
                event.preventDefault();
                event.stopPropagation();
                return $.growl.error({
                    title: "错误标题",
                    message: "错误消息内容!"
                });
            });

            $('.notice').click(function (event) {
                event.preventDefault();
                event.stopPropagation();
                return $.growl.notice({
                    title: "提醒标题",
                    message: "提醒消息内容!"
                });
            });

            return $('.warning').click(function (event) {
                event.preventDefault();
                event.stopPropagation();
                return $.growl.warning({
                    title: "警告标题",
                    message: "警告消息内容!"
                });
            });
        });
    </script>

</head>
<body>

<ul>
    <li>
        <a class="error" href="#">错误!</a>
    </li>
    <li>
        <a class="notice" href="#">提醒!</a>
    </li>
    <li>
        <a class="warning" href="#">警告!</a>
    </li>
</ul>

</body>
</html>